import request from 'utils/request'
// import { getToken } from 'utils/storage'

/**
 * 用户登录
 * @param {*} data {code,mobile}
 */
export const loginApi = (data) => {
  return request({
    url: '/v1_0/authorizations',
    method: 'POST',
    data,
  })
}

/**
 * 获取用户信息
 * @returns
 */
export const getUserInfoApi = () => {
  return request({
    url: '/v1_0/user/profile',
    method: 'GET',
    // headers: { Authorization: 'Bearer ' + JSON.parse(getToken()).token },
  })
}
